<template>
  <div class="conter_main">
    <!-- two1 -->
    <div >
      <button @click="gaibian">颜色改变</button>
      <span>1{{ this.$store.state.colorchange }}</span>
    </div>
    <div class="jianbianse">
      渐变色背景
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    gaibian() {
      console.log(this.$store.state.colorchange);
    },
  },
  mounted() {
    // console.log(this.$store.state.colorchange);
    if (this.$store.state.colorchange==0) {
        
      }
  },
};
</script>

<style lang="scss" scoped>
.conter_main{
  padding-top: 15px;
  .jianbianse{
    width: 500px;
    height: 500px;
    margin-top: 20px;
    background: linear-gradient(to right, #000, #fff, #000);
    box-shadow: 10px 10px 10px 10px #000;
  }
}
</style>
